﻿using System;
using System.Collections.Generic;
using System.Text;
using Obsidian.Edm;

namespace Obsidian.Data
{
    public interface ICache
    {

        void Set<T>(string key, T value) where T : IModel, new();

        void Set<T>(string key, T value, int validTime) where T : IModel, new();

        //void Set<T>(string key, T value, int validTime, int holdTime) where T : IModel, new();

        void Set(string key, object value);

        void Set(string key, object value, int validTime);

        //void Set(string key, object value, int validTime, int holdTime);

        bool Exists<T>(string key) where T : IModel, new();

        void Delete<T>(string key) where T : IModel, new();

        T Get<T>(string key) where T : IModel, new();

        object Get(string key);

    }
}
